package com.bing.beans;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;

/**
 * Created by kai on 2014/4/9.
 */
public class BeanLife implements InitializingBean{
    private static final Logger logger = LoggerFactory.getLogger(BeanLife.class);
    private String name;
    private int age;


    public void postContructor(){
        logger.info("postConsturcto");
    }
    public void init(){
        logger.info("init....");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        name=name+"after";
        logger.info("afterPropertiesSet name:{},age:{}",name,age);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
